package com.cyx.controller;

import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BookController {
    @RequestMapping("/books")
    public String getBooks(){
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("id","1111");
        jsonObject.put("name","json入门");

        return jsonObject.toJSONString();
    }
}
